<script setup>
const props = defineProps({
  title: {
    type: String,
    default: '标题',
  },
  icon: {
    type: String,
    default: 'ScaleToOriginal',
  },
})
</script>

<template>
<div class="aside-card-main">
    <div class="aside-card-header">
        <div class="aside-card-icon">
            <el-icon><component :is="icon" /></el-icon>
        </div>
        <div class="aside-card-title">{{title}}</div>
    </div>
    <div class="aside-card-content">
        <slot></slot>
    </div>
</div>
</template>

<style scoped>
.aside-card-content{
    width: 100%;
}
.aside-card-main{
    width: 280px;
    display: flex;
    font-size: 16px;
    flex-direction: column;
    padding: 10px;
    align-items: center;
    background-color: rgb(23, 23, 23);
    border: 1px rgb(38, 38, 38) solid;
    border-radius: 10px;
    min-height: 100px;
}
.aside-card-header{
    display: flex;
    align-self: flex-start;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}
.aside-card-icon{
    display: flex;
    align-items: center;
    justify-content: center;
}
</style>
